home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / COMMON.ZIP / VERT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-03  |  776 b   |  35 lines

  1. #define INPUT_STATUS_1  03dah   //Input Status 1 register
  2.  
  3.  
  4.  
  5. /* wait for vertical sync */
  6. /* ---------------------- wait_vert() -------------------- March 27,1993 */
  7. void wait_vert(void)
  8. {
  9.    asm   {
  10.          mov     dx,INPUT_STATUS_1
  11.          }
  12. WaitVS:
  13.    asm   {
  14.          in      al,dx
  15.          test    al,08h
  16.          jz      WaitVS  /* vertical sync is active high (1 = active) */
  17.          }
  18. }
  19.  
  20. /* wait for vertical sync */
  21. /* ---------------------- wait_vert() -------------------- March 27,1993 */
  22. void wait_not_vert(void)
  23. {
  24.    asm   {
  25.          mov     dx,INPUT_STATUS_1
  26.          }
  27. WaitVS:
  28.    asm   {
  29.          in      al,dx
  30.          test    al,08h
  31.          jnz      WaitVS  /* vertical sync is active high (1 = active) */
  32.          }
  33. }
  34.  
  35.